@import "./vars.scss";
// -------------------------------------------
// 通用样式 比如通用btn等等

*,
*::after,
*::before {
  box-sizing: border-box;
}
html,
body {
  scroll-behavior: smooth;
}
body {
  font-family: Roboto_REGULAR, "微软雅黑", Arial, sans-serif;
  font-weight: 400;
  font-size: 14px;
  color: $color;
}

input,
button,
select,
textarea {
  padding: 0;
  outline: none;
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  vertical-align: top;
  border: 0;
}
.scr {
  overflow-x: hidden;
}
.scr::-webkit-scrollbar {
  /*滚动条整体样式*/
  width: 5px;
  height: 5px;
}
.scr::-webkit-scrollbar-thumb {
  /*滚动条里面小方块*/
  background-color: #ccc;
  border: solid 1px #ccc;
  border-radius: 2px;
}
.scr::-webkit-scrollbar-track {
  /*滚动条里面轨道*/
  -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  border-radius: 2px;
  background: #ededed;
}
.scr::-webkit-scrollbar-arrow {
  color: #f00;
  background: #0f0;
}

// -------------------------------------------
// 字体
@font-face {
  font-family: Roboto_REGULAR;
  src: url("../font/ROBOTO-REGULAR.TTF");
}
@font-face {
  font-family: GideonRoman_REGULAR;
  src: url("../font/GideonRoman-Regular.ttf");
}
.ellipsis {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

// 全站通用标题
.index_h2 {
  font-size: 34px;
  height: 34px;
  font-weight: bold;
  overflow: hidden;
}

// 用于锚点 top-line 高度75px
.diff-84 {
  position: absolute;
  top: -84px;
}

.overflow_hidden {
  overflow: hidden;
}

.h100per {
  height: 100%;
}
.w100per {
  width: 100% !important;
}

// 34px的字体有些overflow：hidden被遮住
.h36 {
  height: 36px !important;
}
.animate-pic {
  overflow: hidden;
  img {
    opacity: 1;
    -webkit-transform: matrix(1.5, 0, 0, 1.5, 0, 0);
    transform: matrix(1.5, 0, 0, 1.5, 0, 0);
    -moz-transition: all 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    -o-transition: all 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    -webkit-transition: all 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transition: all 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    -webkit-transform-origin: bottom;
    transform-origin: bottom;
    will-change: transform;
    width: 100%;
  }
  &.animated {
    img {
      opacity: 1;
      visibility: visible;
      -webkit-transform: matrix(1, 0, 0, 1, 0, 0);
      transform: matrix(1, 0, 0, 1, 0, 0);
    }
  }
}

// 卡片效果
.cardWrapper {
  position: relative;
  @include transform-style(preserve-3d);
  &:hover .card {
    @include transform(perspective(500px) rotateY(30deg));
  }

  .card:hover {
    @include transform(perspective(500px) rotateY(0deg));
  }
  .card:hover ~ .card {
    @include transform(perspective(500px) rotateY(-30deg));
  }

  .card {
    position: relative;
    display: inline-block;
    @include transform(perspective(500px));
    @include transform-style(preserve-3d);
  }
}

// 地图坐标的线条动画
#markinfoCanvas {
  position: absolute;
  z-index: 9;
  cursor: pointer;
  display: none;
}

// 地图mark通用样式
.markinfo {
  z-index: 10;
  cursor: pointer;
  opacity: 0;
}

// 坐标点动画
.circle {
  background: $mark;
  border-radius: 50%;
  width: 6px;
  height: 6px;
  cursor: pointer;
  position: relative;

  &.stop::before,
  &.stop::after {
    animation-play-state: paused;
    display: none;
  }
  &:before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: $mark;
    opacity: 0.4;
    border-radius: 50%;
    animation: 1s scale linear infinite;
    animation-delay: 200ms;
    z-index: 0;
  }
  &:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: $mark;
    opacity: 0.4;
    border-radius: 50%;
    animation: 1s scale linear infinite;
    animation-delay: 600ms;
    z-index: 0;
  }
}

.chover {
  .pic {
    @include transition(transform 1s);
  }
  .pic2 {
    @include transition(transform 1s);
  }
  .cline {
    @include transition(width 1s);
  }
}

.chover:hover {
  .pic {
    @include transform(scale(1.1));
  }
  .cline {
    width: 100%;
  }
}

// 更多按钮 线条衍生
.toall {
  display: inline-block;
  cursor: pointer;
  &:hover,
  &.on {
    .toall-txtbox {
      color: $active;
      .toall-arrow {
        color: $active;
      }
    }
    .toall-line {
      width: 100%;
    }
  }
  .toall-txtbox {
    @include display(flex);
    @include align-items(center);
    @include transition(all 1s);
    color: $color7;
    .toall-arrow {
      margin-left: 7px;
      font-size: 12px;
      color: $color6;
      @include transform(scale(0.8));
    }
  }

  .toall-line {
    height: 1px;
    background-color: $active;
    margin-top: 6px;
    width: 0;
    @include transition(width 1s);
  }
}

// 首页第二屏 图片上的动画
.img-move {
  position: relative;
  overflow: hidden;
}

.img-move img {
  width: 100%;
}

.img-move .before {
  display: block;
  position: absolute;
  z-index: 3;
  opacity: 0.5;
  width: 100%;
  height: 100%;
  background-color: #fff;
  transform: translateX(105%);
}

.img-move .after {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: translateX(105%);
  opacity: 0.7;
  background-color: #fff;
}

.img-move-move {
  animation-name: img-move-move;
}

.img-move-moveR {
  animation-name: img-move-moveR;
}

@keyframes img-move-move {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(105%);
  }
}

@keyframes img-move-moveR {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-105%);
  }
}

// 按钮动画
.btn-blue {
  position: relative;
  cursor: pointer;
  width: 220px;
  height: 72px;
  overflow: hidden;
  @include display(flex);
  @include justify-content(center);
  @include align-items(center);
  @include transition(transform 1s);
  opacity: 0;
  font-size: 15px;
  .btn-relative {
    position: relative;
    @include display(flex);
    @include align-items(center);
  }
  > * {
    position: relative;
  }
  &.entry {
    opacity: 1;
    &::before {
      transform: translate3d(0, 0, 0);
    }
  }
  &:hover {
    &::after {
      transform: translate3d(110%, 0, 0);
    }
  }
  &::after {
    @include transition(transform 0.8s);
    position: absolute;
    content: " ";
    width: 100%;
    height: 100%;
    transform: translate3d(-110%, 0, 0);
    background-color: rgba(255, 255, 255, 0.3);
  }
  &::before {
    @include transition(transform 0.8s);
    position: absolute;
    content: " ";
    width: 100%;
    height: 100%;
    transform: translate3d(-110%, 0, 0);
    background-color: $active;
  }
  .absn-more-txt {
    position: relative;
  }
  .absn-more-arrow {
    margin-left: 39px;
    position: relative;
  }
}

.btn {
  padding: 12px 10px;
  display: inline-flex;
  @include align-items(center);
  font-size: 14px;
  color: #fff;
  cursor: pointer;
  background-color: $active;
  &.btn-orange {
    background-color: $mark2;
  }
  .iconfont {
    margin-right: 5px;
  }
}

// blog列表
.blog-item {
  @include display(flex);
  @include flex-direction(column);
  padding-bottom: 30px;
  .blog-figure {
    overflow: hidden;
  }
  .blog-h4 {
    margin-top: 30px;
    margin-bottom: 23px;
    font-size: 20px;
    color: $color;
  }
  .blog-p {
    color: $color4;
    line-height: 23px;
    @include line-clamp(3);
  }
  .blog-info {
    margin-top: 30px;
    @include display(flex);
    @include justify-content(space-between);
    .blog-toall,
    .blog-time {
      max-width: 50%;
    }
    .blog-time {
      color: $color5;
    }
  }
}

// video遮罩
.mask {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  width: 100vw;
  height: 100vh;
  z-index: 21;
  background-color: rgba(0, 0, 0, 0.8);
  @include display(flex);
  @include align-items(center);
  @include transform(translateY(-100%) scaleY(0));
  @include justify-content(center);

  &.on {
    @include transition(transform 0.5s);
    @include transform(translateY(0) scaleY(1));
  }
  .video-wrapper {
    position: relative;
    .icon-yuyinguanbi {
      position: absolute;
      top: -24px;
      right: -24px;
      font-size: 18px;
      color: #fff;
      cursor: pointer;
      @include transition(transform 1s);
      &:hover {
        @include transform(rotate(180deg));
      }
    }
  }
  #my-player {
    video {
      object-fit: cover;
    }
  }
}

// 分页器
.index_paging {
  @include display(flex);
  @include justify-content(center);

  font-size: 16px;
  a {
    width: 32px;
    height: 32px;
    @include display(flex);
    @include justify-content(center);
    @include align-items(center);
    color: #000;
    margin: 0 2px;
    @include transition(all 0.3s);
    border-radius: 50%;
    &.on,
    &:hover {
      color: #fff;
      background-color: $footer;
    }

    &:not([href]) {
      &.on,
      &:hover {
        color: #000;
        cursor: default;
        background-color: transparent;
        border-radius: 0;
      }
    }
  }
}

.blogl-linkgroup {
  color: $color18;
  font-size: 16px;
  text-align: center;
  .blogl-link {
    padding: 0 32px;
    @include transition(color 0.3s);
    &.on,
    &:hover {
      color: $active;
    }
  }
}

// 下拉列表
.dropdown {
  position: relative;
  .dropdown-toggle {
    background-color: $bg4;
    border-radius: 5px;
    @include display(flex);
    @include align-items(center);
    height: 48px;
    font-size: 16px;
    line-height: 2;
    color: #202020;
    cursor: default;
    .dropdown-txt {
      @include flex(1);
      padding-left: 25px;
    }
    .caret {
      width: 43px;
      border-left: 1px solid #cdcdcd;
      @include flex-basis(43px);
      @include display(flex);
      @include align-items(center);
      &:before {
        content: "\e610";
        color: #cdcdcd;
        margin: 0 17px 0 12px;
        font-size: 13px;
      }
    }
  }
  .dropdown-menu {
    position: absolute;
    display: none;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    min-width: 160px;
    padding: 5px 0;
    margin: 2px 0 0;
    font-size: 14px;
    text-align: left;
    list-style: none;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.18);
    li {
      display: block;
      padding: 3px 20px;
      clear: both;
      font-weight: 400;
      line-height: 1.42857143;
      color: #333;
      white-space: nowrap;
      cursor: pointer;
      &:hover {
        color: #262626;
        background-color: #f5f5f5;
      }
    }
  }
}

@media screen and (max-width: 768px) {

  .ellipsis {
    overflow: unset;
    text-overflow: unset;
    white-space: unset;
  }
  .mask .video-wrapper .video-js {
    width: 100%;
  }
  .index_h2 {
    font-size: 30px;
  }
  #markinfoCanvas {
    transform: scaleX(-1);
  }
  .mask .video-wrapper {
    width: 100%;
    padding: 0 15px;
  }
  .mask .video-wrapper .icon-yuyinguanbi {
    right: 15px;
  }
  .my-player-dimensions {
    width: 100%;
    height: 200px;
  }
  .dropdown .dropdown-menu li {
    padding: 10px 20px;
  }
  .blog-item .blog-h4 {
    margin: 15px 0;
    font-size: 18px;
  }
  .blog-item .blog-p {
    line-height: 1.5;
    overflow: unset;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
  }
  .blog-item .blog-info {
    margin-top: 20px;
  }

  .cardWrapper {
    @include transform-style(unset);
    &:hover .card {
      @include transform(unset);
    }
  
    .card:hover {
      @include transform(unset);
    }
    .card:hover ~ .card {
      @include transform(unset);
    }
  
    .card {
      @include transform(unset);
      @include transform-style(unset);
    }
  }
}
